﻿using System.Net;
using System.Runtime.Serialization;

namespace Toybox.NicoSharp.Video.RiApi.RiApiPrimitives
{
	using Extensions;
	using Utilities;

	public abstract class AbstractRiApi
	{

		#region [Static]

		protected static T Get<T>(string url, CookieCollection cookies)
		{
			string json = NicoWebClient.Get(url, cookies.Coerce());
			return Deserializer.JsonDeserializer<T>(json);
		}

		#endregion [Static]


		#region Public Members

		[DataMember]
		public string status;

		[DataMember]
		public string message;

		#endregion Public Members

	}
}